Column

Distribution of order time for department

data(instacart)
instacart %>% 
  group_by(department) %>%
  plot_ly(x = ~department, y = ~order_hour_of_day, color = ~department, type = "box") 
## Warning in RColorBrewer::brewer.pal(N, "Set2"): n too large, allowed maximum for palette Set2 is 8
## Returning the palette you asked for with that many colors

## Warning in RColorBrewer::brewer.pal(N, "Set2"): n too large, allowed maximum for palette Set2 is 8
## Returning the palette you asked for with that many colors

Column

Number of items ordered in each department

instacart %>% 
  count(department) %>%
  mutate(department = fct_reorder(department, -n)) %>%
  plot_ly(x = ~department, y = ~n, color = ~department)
## No trace type specified:
##   Based on info supplied, a 'bar' trace seems appropriate.
##   Read more about this trace type -> https://plot.ly/r/reference/#bar
## Warning in RColorBrewer::brewer.pal(N, "Set2"): n too large, allowed maximum for palette Set2 is 8
## Returning the palette you asked for with that many colors

## Warning in RColorBrewer::brewer.pal(N, "Set2"): n too large, allowed maximum for palette Set2 is 8
## Returning the palette you asked for with that many colors

Number of items ordered during each day of the week

instacart %>% 
  mutate(order_dow = factor(order_dow)) %>%
  group_by(order_dow) %>%
  count(order_hour_of_day) %>% 
  plot_ly(x = ~order_hour_of_day, y = ~n, color = ~order_dow, type = "scatter", mode = "lines")